package com.wp.land.test;

import com.wp.land.entity.qrcode.XYS;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author: zhou
 * @Description:
 * @Date:Create in 2019/05/10
 * @Modified By:
 */

public class JavaOption {

    public static void main(String[] args){
        List<XYS> xysList = new ArrayList<>();
        xysList.add(new XYS("1",1,"1"));
        xysList.add(new XYS("2",2,"2"));
        xysList.add(new XYS("3",3,"3"));
        xysList.add(new XYS("4",4,"4"));

        List<String> ss = xysList.stream().map(XYS::getS).collect(Collectors.toList());


        List<XYS> ss1 = xysList.stream().filter(xys ->
            xys.getX().startsWith("1")
        ).collect(Collectors.toList());


        System.out.println(ss.toString());
        System.out.println(ss1.toString());
    }
}
